//
//  GPS.h
//  itaka
//
//  Created by Robert Soszynski on 1/14/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import <MapKit/MapKit.h>

@protocol GPSDelegate <NSObject> 
@required
- (void) GPSUpdated;
@end

@interface GPS : NSObject <CLLocationManagerDelegate, MKReverseGeocoderDelegate> {
    id <GPSDelegate> delegate;
    CLLocationManager *locationManager;
    MKReverseGeocoder *reverseGeocoder;
    
    NSNumber *latitude;
    NSNumber *longitude;
    NSString *address;
    NSDate *timestamp;
    
    BOOL onDemand;
}

@property (retain, nonatomic) id <GPSDelegate> delegate;
@property (nonatomic, retain) CLLocationManager *locationManager;
@property (nonatomic, retain) MKReverseGeocoder *reverseGeocoder;
@property (retain, nonatomic) NSString *address;
@property (retain, nonatomic) NSNumber *latitude, *longitude;
@property (nonatomic, retain) NSDate *timestamp;
@property (nonatomic, assign) BOOL onDemand;

- (void) start;
- (void) stop;

- (void) startOnDemand;
- (void) stopOnDemand;

@end
